package cz.vse.javaee.album;

/**
 * Bean pro stránku detailu fotografie. V podstatě
 * obaluje gateway fotografie.
 * {@link cz.vse.javaee.album.AlbumPageBean} udržuje
 * odkaz na tento bean.
 */
public class PhotoDetailPageBean {

    private final PhotoGateway gateway;

    public PhotoDetailPageBean(PhotoGateway gateway) {
        this.gateway = gateway;
    }

    public PhotoGateway getGateway() {
        return gateway;
    }

    public Photo getPhoto() {
        return gateway.getCurrent();
    }

    public void close() {
        gateway.closeGate();
    }
}
